<?php
	require("includes/basic.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
	<HEAD>
		<TITLE> :: <?php echo $appName?> :: </TITLE>
		<link rel='stylesheet' type='text/css' href='style/inner.css'>
		<script type='text/javascript' src='js/inner.js'></script>
		<script type="text/javascript" src="js/jquery-latest.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
		    $("table#fileupload").hide();
		    $("p#upload").click(function(){
		    $("table#fileupload").show();
		    $("p#upload").html("");
		  });
		});
		</script>


		<!-- validation start -->

		<link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<link rel="stylesheet" href="css/template.css" type="text/css" media="screen" title="no title" charset="utf-8" />
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
		<script src="js/jquery.validationEngine-en.js" type="text/javascript"></script>
		<script src="js/jquery.validationEngine.js" type="text/javascript"></script>
		
				
		<script>	
		$(document).ready(function() {

			
			$("#edit-task").validationEngine()
		
		});
		
		
		/* function validate2fields(){
			if($("#fname").val() =="" ||  $("#lname").val() == ""){
				return false;
			}else{
				return true;
			}
		} */
		</script>
		
		<!-- validation end -->

	</HEAD>

	<body unselectable="on" class="dialog"> 
		<?php $pageName="Administration View"; ?>
		<?php require("includes/header.php"); ?>

		<!-- devi : body content begins here -->
		<table class="dialog" cellpadding="0" cellspacing="0"><tr><td> 
		<table class="dialogbox" cellpadding="0" cellspacing="0"> 
		<tr><td> 
		<div class="dialoghead" unselectable="on">
		Edit Task Wizard
		</div><div class="dialogcontent" style="height: 450px;" unselectable="on">

		<form method="post" onSubmit="return checkSubmit()" id="edit-task" action="edit-task-process.php" class="nomargin">

		<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
		<tr><td style="vertical-align: top;">

		<div class="dialogspacer" unselectable="on">&nbsp;</div>
			<?php $buttonTitle = "Edit a Task"; ?>
			<?php $buttonSize = "200px"; ?>
			<?php require("greenHeaderButton.php"); ?>
		<div class="dialogspacer" unselectable="on">&nbsp;</div>

		
		</td></tr>
		<tr><td style="vertical-align: middle;">
			<div class="dialogspacer" unselectable="on">&nbsp;</div>
			<div class="dialogspacer" unselectable="on">&nbsp;</div>
		</td></tr>
		<tr><td style="vertical-align: bottom;">


		<div class="dialogblockborder dialogblockborderheadline" unselectable="on"> 
		<div class="dialogblock" unselectable="on"> 
		<span class="dialogblockhead" unselectable="on">Task Details</span>
		<?php
		$taskid=$_REQUEST['t'];
		$taskdetails=mysql_query("select * from task_master where task_id=$taskid");
		$row=mysql_fetch_array($taskdetails);
		extract($row);
		?>

		<table border="0" cellpadding="2" cellspacing="0">
		<input type="hidden" name="task" value="<?php echo $taskid;?>">
		<input type="hidden" name="project" value="<?php echo $project_id;?>">
		<input type="hidden" name="phase" value="<?php echo $phase_id;?>">
		<input type="hidden" name="module" value="<?php echo $module_id;?>">

			<tr>
				<td>Task Title : </td>
				<td><input type='text' name='title' id='title' class="validate[required] text-input" value="<?php echo $row['task_title'];?>"/>
				</td>
				<td><img id="img1" name="img1" src="images/help.png" border="0" onmouseout="hideHelp(1);" onmouseover="showHelp(1);"></td>
			</tr>
			<tr>
				<td>Task Description : </td>
				<td><TEXTAREA NAME="taskdesc" id="taskdesc" class="validate[required] text-input" ROWS="6" COLS="60"><?php echo $row['task_description'];?></TEXTAREA></td>
				<td><img id="img3" name="img3" src="images/help.png" border="0" onmouseout="hideHelp(3);" onmouseover="showHelp(3);"></td>
			</tr>
			<tr>
				<td>Estimated Time : </td>
				<td><input type='text' name='etime' id='etime' class="validate[required,custom[onlyNumber]] text-input" value="<?php echo $row['estimated_time'];?>">
				</td>
				<td><img id="img1" name="img1" src="images/help.png" border="0" onmouseout="hideHelp(1);" onmouseover="showHelp(1);"></td>
			</tr>
			<tr>
				<td>Priority : </td>
				<td><select name='priority' id='priority'>
				<option selected value="<?php echo $row['task_priority'];?>"><?php echo $row['task_priority'];?></option>
				<option value='Low'>Low</option>
				<option value='Medium'>Medium</option>
				<option value='High'>High</option>
				</select>
				</td>
				<td><img id="img1" name="img1" src="images/help.png" border="0" onmouseout="hideHelp(1);" onmouseover="showHelp(1);"></td>
			</tr>
			<tr>
				<td>Upload Task Files : </td>
				<td><INPUT TYPE="file" NAME="uploadedfile"></td>
				<td><img id="img4" name="img4" src="images/help.png" border="0" onmouseout="hideHelp(4);" onmouseover="showHelp(4);"></td>
			</tr>
			<tr><td><p id="upload" style="cursor:pointer;">Upload More Files</p></td><td>
					<table id="fileupload">
					<tr><td><input type="file" maxlength="255" name="file" id="file1"></td></tr>
					<tr><td><input type="file" maxlength="255" name="file2" id="file2"></td></tr>
					<tr><td><input type="file" maxlength="255" name="file3" id="file3"></td></tr>
					<tr><td><input type="file" maxlength="255" name="file4" id="file4"></td></tr>
					<tr><td><input type="file" maxlength="255" name="file5" id="file5"></td></tr>
					</table>
					 </td>
					 <td>&nbsp;</td>
			</tr>
		</table>
		</div></div>

		</td></tr>
		</table>
		</div>
		 

		<div class="dialogbuttons" unselectable="on">

		<input name="back" type="button" value="&#060;&#060; Back" class="dialogbutton" onclick="javascript:history.go(-1)">
		<input name="submit" type="submit" value="Save &#062;&#062;" class="dialogbutton">
		<input name="cancel" type="button" value="Cancel" class="dialogbutton" onclick="window.location.href='index.php';" style="margin-left: 50px;">
		</form>
		</div>


		<div class="help" name="help1" id="help1" onmouseout="hideHelp(1);" onmouseover="showHelp(1);">
			Select the client name
		</div>


		<div class="help" name="help2" id="help2" onmouseout="hideHelp(2);" onmouseover="showHelp(2);">
			Enter the project name
		</div>

		<div class="help" name="help3" id="help3" onmouseout="hideHelp(3);" onmouseover="showHelp(3);">
			Please enter the project description.
		</div>

		<div class="help" name="help4" id="help4" onmouseout="hideHelp(4);" onmouseover="showHelp(4);">
			Upload project files
		</div>

		<div class="help" name="help5" id="help5" onmouseout="hideHelp(5);" onmouseover="showHelp(5);">
			Clieck on the text to Upload more project files
		</div>

		<!-- <div class="help" name="help6" id="help6" onmouseout="hideHelp(6);" onmouseover="showHelp(6);">
			Enter the mobile number of the contact for the company
		</div>

		<div class="help" name="help7" id="help7" onmouseout="hideHelp(7);" onmouseover="showHelp(7);">
			Enter the postal address of the company
		</div> -->

		</td></tr></table> 
		</td></tr></table> 
		<p>&nbsp;</p> 

		<!-- devi : body content ends here -->
		
		<?php require("includes/footer.php"); ?>
	</BODY>
</HTML>
